package com.huluobo.a2107kotlinshopping.db

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update

/**
 *  Created by LC on 2023/11/15.
 */
@Dao
interface MoneyDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertMoney(money: Money)

    @Update
    fun updateMoney(money: Money)

    @Query("select * from user_money where user_id = :user_id")
    fun queryUserMoney(user_id: Int): Money

    @Delete
    fun deleteMoney(money: Money)
}